package com.yunduansing.demo.mapper;

import com.yunduansing.demo.entity.DictionaryEntity;
import com.yunduansing.demo.model.dictionary.DictionaryTreeModel;

import org.apache.ibatis.annotations.Select;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 * 字典表 Mapper 接口
 * </p>
 *
 * @author yunduansing
 * @since 2020-05-24
 */
public interface DictionaryMapper extends BaseMapper<DictionaryEntity> {
    @Select("select a.*,b.name categoryName,b.code categoryCode from sys_dictionary a left join sys_dictionary_category b on a.category_id=b.id where a.status=1")
    public List<DictionaryTreeModel> getAll();
}
